<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:sijyp="http://java.sun.com/jsf/composite/sijyp"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a="http://xmlns.jcp.org/jsf/passthrough">

	<h:panelGrid width="100%" id="ldMainFieldsContainer">

		<h:panelGrid id="ld_4ColsFieldsContainer" width="100%" columns="2"
			columnClasses="firstColumnStyle">

			<h:outputLabel
				value="${msg['bienes.situacion.limitacionDominio.fields.tipoLimitacion']}*" />

			<h:panelGrid>
				<h:selectOneMenu id="ldTipoDocumentoSelect"
					styleClass="trimInputField"
					value="#{limitacionDominioBienManager.ld.tpLimitaciondominio.idTpLimitacionDominio}"
					required="true" requiredMessage="${msg['general.requerido']}"
					validatorMessage="${msg['general.requerido']}"
					disabled="#{disableTableEditCommands}">
					<f:selectItems value="#{applicationBean.tiposLimitacion}" />
					<f:ajax event="change" execute="@this"
						render="ldTipoDocumentoSelect :sijypMessages" />
				</h:selectOneMenu>
				<h:message for="ldTipoDocumentoSelect"
					errorClass="validationErrorMessage" showSummary="false" />
			</h:panelGrid>
		</h:panelGrid>
		<br />

		<h:panelGrid width="100%" columns="4"
			columnClasses="firstColumnStyle, , , ">

			<h:outputLabel
				value="${msg['bienes.situacion.limitacionDominio.fields.fechaInicial']}" />
			<h:panelGrid>
				<rich:calendar id="fechaInicialLd"
					value="#{limitacionDominioBienManager.ld.fchInicio}"
					disabled="#{disableTableEditCommands}" datePattern="dd/MM/yyyy"
					defaultTime="00:00:00" dayClassFunction="obtenerEstiloDisabled"
					boundaryDatesMode="hidden"
					rendered="true" />
				<h:message for="fechaInicialLd" errorClass="validationErrorMessage"
					showSummary="false" />
			</h:panelGrid>

			<h:outputLabel
				value="${msg['bienes.situacion.limitacionDominio.fields.fechaFinal']}" />
			<h:panelGroup>
				<rich:calendar id="fechaFinalLd"
					value="#{limitacionDominioBienManager.ld.fchFin}"
					validatorMessage="${msg['general.requerido']}"
					disabled="#{disableTableEditCommands}" datePattern="dd/MM/yyyy"
					defaultTime="00:00:00" dayClassFunction="obtenerEstiloDisabled"
					boundaryDatesMode="hidden"
					rendered="true" />
				<h:message for="fechaFinalLd" errorClass="validationErrorMessage"
					showSummary="false" />
			</h:panelGroup>

		</h:panelGrid>
		<br/>
		<h:panelGrid width="100%" columns="4"
			columnClasses="firstColumnStyle, , , ">

			<h:outputLabel
				value="${msg['bienes.situacion.limitacionDominio.fields.valorLimitacion']}"
				for="ldValorLimitacionInput" />
			<h:panelGrid>
				<h:inputText id="ldValorLimitacionInput" maxlength="150"
					disabled="#{disableTableEditCommands}"
					value="#{limitacionDominioBienManager.ld.valor}" styleClass="">
					<f:convertNumber type="currency" maxFractionDigits="2"
						currencySymbol="" />
				</h:inputText>

				<h:message for="ldValorLimitacionInput"
					errorClass="validationErrorMessage" showSummary="false" />
			</h:panelGrid>

			<h:outputLabel
				value="${msg['bienes.situacion.limitacionDominio.fields.moneda']}"
				for="ldMonedaSelect" />
			<h:panelGroup>
				<h:selectOneMenu id="ldMonedaSelect" styleClass="trimInputField"
					value="#{limitacionDominioBienManager.ld.tpMoneda.tpMoneda}"
					disabled="#{disableTableEditCommands}">
					<f:selectItems value="#{applicationBean.tipoMonedas}" />
					<f:ajax event="change" execute="@this"
						render="ldMonedaSelect :sijypMessages" />
				</h:selectOneMenu>
				<h:message for="ldMonedaSelect" errorClass="validationErrorMessage"
					showSummary="false" />
			</h:panelGroup>



		</h:panelGrid>

		<h:panelGrid id="ldObservacionesPanel" width="100%" columns="2"
			columnClasses="firstColumnStyle, ">
			<h:panelGrid>
				<ui:remove>Observaciones</ui:remove>
				<h:outputLabel
					value="${msg['bienes.situacion.limitacionDominio.fields.observaciones']}"
					for="ldObservacionesInput" />
			</h:panelGrid>
			<h:panelGrid width="100%">
				<h:inputTextarea id="ldObservacionesInput" style="width:100%"
					styleClass="long count250" rows="4"
					value="#{limitacionDominioBienManager.ld.observaciones}"
					disabled="#{disableTableEditCommands}" a:maxlength="250">
					<f:validateLength maximum="250" />
				</h:inputTextarea>
			</h:panelGrid>
		</h:panelGrid>
		<br />
		<br />
		<ui:remove>
			<h:panelGrid columns="2" columnClasses="firstColumnStyle, "
				width="100%">
			</h:panelGrid>
		</ui:remove>
		<h:outputLabel
			value="${msg['bienes.situacion.limitacionDominio.fields.soporteDeLimitacion']}"
			style="font-weight: bold" />
		<hr />

		<ui:remove>File upload</ui:remove>
		<sijyp:fileUploadSijyp rendered="true" required="false"
			tiposDocumentos="#{applicationBean.tipoDocumentoLimitacionDominios}"
			isReading="#{disableTableEditCommands}"
			bean="#{limitacionDominioBienManager.fileUploadBean}"
			labelUpload="${msg['bienes.situacion.limitacionDominio.fields.anexo']}" />

	</h:panelGrid>
	<hr align="center" width="95%" />
</ui:composition>
